home *** CD-ROM | disk | FTP | other *** search
/ Delphi 2.0 - Programmer's Utilities Power Pack / Delphi 2.0 Programmer's Utilities Power Pack.iso / s_to_z / tpack / regtpack.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1996-09-15  |  9.0 KB  |  210 lines

  1. unit RegTPack;     {Registers TPack components into TPack Pages}
  2.  
  3. { 32 Components, 10 Forms = 42 Pieces, not counting types }
  4.  
  5. { What I meant is that if this was chicken, you'd have paid $2.98 a piece;
  6.   Since there is no free lunch, please decide early on to get the help and
  7.   comments on these components and classes. I have to eat too.}
  8.  
  9. interface
  10.  
  11. uses
  12.  
  13.  {No Source}
  14.    Xtension        {Component Extensions and the low key Invoice Bugger.}
  15.   ,Retry           {*Logic to implement Retry used in TblCore and IniLink}
  16.   ,DocProps        {Read-only run-time object inspector}
  17.  
  18.  {Full Source Dialogs}
  19.   ,About           {Yawn}
  20.   ,Working         {NonModal form fakes modal by disabling other forms, offers stop}
  21.   ,Splash          {Library aware splash screen with pause/float timer}
  22.   ,Debug           {Trace window works at run and design time!}
  23.   ,LoginDlg        {Get password with component support}
  24.   ,ErrorMsg        {Report an error allowing retry/ignore optionally}
  25.   ,Invoice         {The real, but not the live nag-screen for your pleasure}
  26.  
  27.  {Full Source Components}
  28.   ,PasUtils        {Assorted Goodies that needed a home}
  29.   ,ToolProc        {Consolidates calls to proc that may be in dll's}
  30.   ,TblRetry        {Table with retry and pack}
  31.   ,Bitbox          {Access Bits in a Byte with links to database}
  32.   ,UserInfo        {Core Classes for Informational and Dialog Components}
  33.   ,UserWin         {Some Windows Statistics}
  34.   ,UserBDE         {Some BDE Statistics}
  35.   ,UserNetW        {Some Netware Info, including the ServerName}
  36.   ,OkCore          {OK/Go/Stop concept used for 'true' working message}
  37.   ,IniLink         {Example of how to go overboard with properties}
  38.   ,Restorer        {basic/specific 'restorers'. FormRestorer shows of link to ini files}
  39.   ,Shells          {Shells to DOS/Windows and DLL's!!}
  40.   ,Toolbar         {Miscelaneous panels with customized creators}
  41.   ,TxtGrid         {Nifty override to autosize columns}
  42.   ,DebugCtl        {Component to control the Trace Window}
  43.   ,Resizer         {Work in progress WinControl attaching resizer panel.}
  44.  
  45.   {Add WINDOS.DCU or .PAS to \DELPHI\LIB before uncommenting UserDOS}
  46.   { also add WINDOS to UserDOS.PAS and uncomment some lines in its last proc}
  47.   {The WINDOS.PAS shipped with this delphi was stored in \DELPHI\SOURCE\RTL\WIN}
  48.  
  49. { ,UserDOS         {Some DOS Statistics}
  50.  
  51.   ;
  52.  
  53.   {* no components, listed for completeness}
  54.  
  55. {also required}
  56. {  Demopack - shows off what's included}
  57. {   RegTPack - this file}
  58.  
  59. {of interest}
  60. {  FiltProp - demonstrates how the object inspector gets its strings}
  61. {   FormDos - show's what's on a form.}
  62.  
  63.  
  64.  
  65. procedure Register;
  66.  
  67. implementation
  68.  
  69.  
  70. {icons with help-file purchase}
  71.  
  72. uses
  73.   DsgnIntf, Classes;
  74.  
  75.  
  76. procedure Register;
  77. begin
  78.  
  79.   {The components are going to 2 pages,
  80.      page one has mostly dialogs and info components,
  81.      page two has mostly ui and shell components.}
  82.  
  83.   RegisterComponents('TPack1',
  84.  
  85.   {components to get and provide 'buffered' data.
  86.    the idea here is that these components get the information they provide when they
  87.    are loaded the store it efficiently for when it's needed.}
  88.  
  89.   [ TWindowsUserInfo           {provides stored windows info and maps some functions}
  90.   , TNetwareUserInfo           {provides stored info about the session from the nw dll}
  91.   , TBDEUserInfo               {provides stored info from a bde info call}
  92.  
  93.   , TSplashScreen              {the library smart splash screen. now with timers.}
  94.  
  95.   , TBitBox                    {access bits of words visually. multiple [snaking] columns}
  96.   , TdbBitBox                  {bitbox linked to a live database field}
  97.  
  98.   {new in 1.1}
  99.   , TIniFileLink               {a three layer ini file user with extensive abstraction}
  100.  
  101.   {new in 2.0}
  102.  
  103.   {abstraction layer.
  104.    we're registering the next three types so you can play around with the properties.
  105.    all components (not controls) in here are descended from these.}
  106.  
  107.   , TComponentExtended         {base type supporting automatic component linking/instantiating}
  108.   , TUserInfo                  {base type for components updating on load}
  109.   , TDialogShell               {base type for form wrappers. need only override execute}
  110.  
  111.   {dialog shell descendents
  112.    these are all dialogs of sorts but they are all called somewhat differently as their
  113.    purposes also differ.}
  114.  
  115.   , TAboutBox                  {About my picture.. Well, there it is.}
  116.   , TLoginDialog               {Standard Password dialog with multiple extensions}
  117.   , TWorkingMsg                {Born 12/23/94, this is my solution to the 'cancel' problem}
  118.   , TErrorDialog               {An errordialog with BDE error decoder and button control}
  119.   , TInvoice                   {Sample of the invoice and what you can do in 45 minutes}
  120.  
  121.  
  122.   , TDebugControl              {COOL when needed; A control for the Library aware trace window}
  123.   ]);
  124.  
  125.  
  126.   {OK. we got the basics out of the way. remember this code is free and that you are allowed
  127.   to eliminate the nag-screen as long as you do not bill for work that is based on components
  128.   you made from these. In no case must you disable the invoice when you use this code in a
  129.   place of business other than your home office or for use other than personal. I figure that
  130.   the money 'they' would spend on you doing that would equal or exceed the cost of the license
  131.   never mind the lost benefit from the help file and missing code. Again, you must register
  132.   as you use this for any business purpose. Thank You, I just had to make that clear.}
  133.  
  134.   {So, on page two we're going to throw out some more concepts..}
  135.  
  136.   RegisterComponents('TPack2',
  137.  
  138.   {TTable with retry is an innocent looking thing that I've made just for this upload. It's
  139.   based in the idea that your user's don't care if a record or table is busy as long as they
  140.   get a chance to retry or cancel their attempt. So Borland invented exceptions (Hey, i know
  141.   it was not like that but I've resolved to say polymorphism only once in this package) and
  142.   this table type uses them to let you automatically retry on open and edit. it also scans.}
  143.  
  144.   [ TTableWithRetry     { Tacks a retry onto a table and uses it for open and edit}
  145.                         { TRetry is a non-source part of this package. see RETRY.INT}
  146.  
  147.  
  148.   {These are the two ancestors of the TWorking Message above. I'm suggesting that while
  149.   they are ancestors they are still viable components of their own. the OK idea in brief:
  150.       OKAware - can return true to a process and do application.processmessages
  151.       OK      - can negotiate with a callback proc and call events when the state changes
  152.       Working - can ask the OK to turn off. It uses a sep. form. the Ok can use buttons.}
  153.  
  154.   , TOkAware            { Signal process on/off without support for user on/off}
  155.   , TOk                 { User Control of process. Turn on/off using buttons on form}
  156.  
  157.  
  158.   {I've seem so many different ways of doing restorers now, I had to try my hand at them and
  159.   this is it so far.
  160.  
  161. {  , TGenericRestorer}  { Generic Restorer hooks into form close, abstract load and save}
  162.   , TFormRestorer       { Concrete load and save for form. Minimal overhead, links to ini file.}
  163.  
  164.  
  165.   {Same with shells. Here's my interpretation of a shell class.}
  166.  
  167.   , TGenericShell       { Supports the link to a working message, messaging options, etc.}
  168.   , TWindowsShell       { One way of doing winexec. }
  169.   , TDLLShell           { that's compatible with calling procs from a dll.}
  170.  
  171.   { TDOS Info & Shell require WINDOS.PAS or DCU. See notes above}
  172.  
  173. { , TDosShell}          { Override WinExec and prefixes the commandline with DOS's comspec}
  174.  
  175. { , TDosInfo}           {not an info component per se, more of a function collection}
  176.  
  177.  
  178.  
  179.   , TReSizerPanel       { A control attaching panel that let you resize one control aligned
  180.                           to each side of the screen (up to 4 sides) but not two next to each
  181.                           other. No promises, but I might distribute that once I figure it out.}
  182.  
  183.   , TToolButton         { a toolbutton, slightly smaller.}
  184.  
  185.   , TToolBar            { a slightly smaller bar attaching to the top}
  186.  
  187.   , TStatusBar          { a Statusbar containing a Status and Message Panel}
  188.   , TStatusPanel        { Used for Hints. Self attaches to Application.OnHint}
  189.   , TMessagePanel       { Show Time/Date/Resource or Idles. Changes when clicked}
  190.  
  191.   , TEdRight            { Needed for the Invoice, overrides create parameters to right align}
  192.   , TTextGrid           { Autosizes the columns of a string grid as 'FitCells' are set.}
  193.   , TPropertyViewer     { An imperfect but usable run-time property viewer. fun stuff.}
  194.  
  195.  
  196.   {with help-file purchase}
  197.  
  198. { , TDataSetReporter    { arbitrary reports on datasources }
  199. { , TDataSetReporterPanel {page/group panels for the reporter}
  200. { , TSleep              {non timer delay to the ms; tInterval uses a timer but does delays already.}
  201.  
  202.   ]);
  203.  
  204.   RegisterPropertyEditor(TypeInfo(TRetry),nil,'', TRetryProperty);
  205.   RegisterPropertyEditor(TypeInfo(TInterval),nil,'', TIntervalProperty);
  206.  
  207. end;
  208.  
  209. end.
  210.